package com.hkp.demo.service.impl;

import com.hkp.demo.entity.Project;
import com.hkp.demo.entity.vo.ProjectDetailsGroupVO;
import com.hkp.demo.mapper.ProjectMapper;
import com.hkp.demo.service.IProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 质量专项表 服务实现类
 * </p>
 *
 * @author HuKangPing
 * @since 2023-02-22 14:20:35
 */
@Service
@Transactional(readOnly = true, rollbackFor = Exception.class)
public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> implements IProjectService {

    @Resource
    private ProjectMapper projectMapper;

    @Override
    public Long getProjectNum(String day) {
        return projectMapper.getProjectNum(day);
    }

    @Override
    public List<ProjectDetailsGroupVO> getRuleAndCounts(String day) {
        return projectMapper.getRuleAndCounts(day);
    }
}
